package com.stone.design.mode.strategy;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 推送策略ONE
 *
 * @author wenpan
 **/
@Slf4j
@Service
@CodeType("ONE")
public class APushStrategyImpl implements PushStrategy {

    @Override
    public void push() {
        log.info("i am strategy ONE, i will be push to one-group");
    }

}

/**
 * 推送策略TWO
 * <p>
 * 说明：@CodeType("TWO") 自定义注解，注解值为不同的编码
 **/
@Slf4j
@CodeType("TWO")
@Service
class BPushStrategyImpl implements PushStrategy {

    @Override
    public void push() {
        log.info("i am strategy TWO，i will be push to two-group");
    }

}